<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>Encrypted file transfer: /home/marco/dev/comm/protocol.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Encrypted file transfer
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('protocol_8c.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">protocol.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;stdio.h&gt;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
<code>#include &lt;stdlib.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="protocol_8h_source.html">protocol.h</a>&quot;</code><br/>
</div>
<p><a href="protocol_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a8c3cd7cda7ec9b4be4d8176a0223244b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="protocol_8c.html#a8c3cd7cda7ec9b4be4d8176a0223244b">proto_init_library</a> ()</td></tr>
<tr class="separator:a8c3cd7cda7ec9b4be4d8176a0223244b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac851c29c26c03f25155d82adaada4014"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="protocol_8c.html#ac851c29c26c03f25155d82adaada4014">proto_get_protocol_code</a> (int socket_descriptor, char *proto_name)</td></tr>
<tr class="separator:ac851c29c26c03f25155d82adaada4014"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab25c6487e37049b4495c8ce9737c2eba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="protocol_8h.html#a53a45e5bfa8921af754097ee6a02f642">proto_module_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="protocol_8c.html#ab25c6487e37049b4495c8ce9737c2eba">proto_lookup</a> (const char *proto_name)</td></tr>
<tr class="separator:ab25c6487e37049b4495c8ce9737c2eba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aff77cc7594d5e7bf73bba0111201b771"><td class="memItemLeft" align="right" valign="top"><a class="el" href="protocol_8h.html#a51289e64344e52297123cda15008c3bd">client_module_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="protocol_8c.html#aff77cc7594d5e7bf73bba0111201b771">client_lookup</a> (const char *proto_name)</td></tr>
<tr class="separator:aff77cc7594d5e7bf73bba0111201b771"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adb7d6e26bb22986630d83d48399e8d1f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="protocol_8c.html#adb7d6e26bb22986630d83d48399e8d1f">proto_expect_command</a> (int socket_descriptor, const char *command)</td></tr>
<tr class="separator:adb7d6e26bb22986630d83d48399e8d1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f6e333d7821f4dc1a2105414a73e259"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="protocol_8c.html#a3f6e333d7821f4dc1a2105414a73e259">proto_send_command</a> (int socket_descriptor, const char *command)</td></tr>
<tr class="separator:a3f6e333d7821f4dc1a2105414a73e259"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab317a4b5fae174c50e993b8498c682e5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="protocol_8c.html#ab317a4b5fae174c50e993b8498c682e5">proto_goodbye_failure</a> (int socket_descriptor, const char *command)</td></tr>
<tr class="separator:ab317a4b5fae174c50e993b8498c682e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf4ad03750e4dc1c4fb7ef3dfc603511"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="protocol_8c.html#abf4ad03750e4dc1c4fb7ef3dfc603511">proto_plain_put</a> (int socket_descriptor)</td></tr>
<tr class="separator:abf4ad03750e4dc1c4fb7ef3dfc603511"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4991c680adc37a7841e8a1cc0c6bf993"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="protocol_8c.html#a4991c680adc37a7841e8a1cc0c6bf993">proto_plain_get</a> (int socket_descriptor)</td></tr>
<tr class="separator:a4991c680adc37a7841e8a1cc0c6bf993"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a22f537a1b34dac5b2ffb6064f5082652"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="protocol_8c.html#a22f537a1b34dac5b2ffb6064f5082652">client_plain_put</a> (int socket_descriptor, const char *filename)</td></tr>
<tr class="separator:a22f537a1b34dac5b2ffb6064f5082652"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab83695a10cb1349b704a5d083cd519d6"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="protocol_8c.html#ab83695a10cb1349b704a5d083cd519d6">client_plain_get</a> (int socket_descriptor, const char *filename)</td></tr>
<tr class="separator:ab83695a10cb1349b704a5d083cd519d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47f900fbd264cbc9f968d05f83cbfc27"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="protocol_8c.html#a47f900fbd264cbc9f968d05f83cbfc27">clean_filename</a> (char *filename)</td></tr>
<tr class="separator:a47f900fbd264cbc9f968d05f83cbfc27"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac363fe1082eefee61957cb913f6b90ca"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="protocol_8c.html#ac363fe1082eefee61957cb913f6b90ca">timespec_subtract</a> (struct timespec *result, struct timespec *x, struct timespec *y)</td></tr>
<tr class="separator:ac363fe1082eefee61957cb913f6b90ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a47f900fbd264cbc9f968d05f83cbfc27"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int clean_filename </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="protocol_8c_source.html#l00593">593</a> of file <a class="el" href="protocol_8c_source.html">protocol.c</a>.</p>

</div>
</div>
<a class="anchor" id="aff77cc7594d5e7bf73bba0111201b771"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="protocol_8h.html#a51289e64344e52297123cda15008c3bd">client_module_t</a> client_lookup </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>proto_name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="protocol_8c_source.html#l00071">71</a> of file <a class="el" href="protocol_8c_source.html">protocol.c</a>.</p>

</div>
</div>
<a class="anchor" id="ab83695a10cb1349b704a5d083cd519d6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int client_plain_get </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>socket_descriptor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>filename</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="protocol_8c_source.html#l00481">481</a> of file <a class="el" href="protocol_8c_source.html">protocol.c</a>.</p>

</div>
</div>
<a class="anchor" id="a22f537a1b34dac5b2ffb6064f5082652"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int client_plain_put </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>socket_descriptor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>filename</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="protocol_8c_source.html#l00406">406</a> of file <a class="el" href="protocol_8c_source.html">protocol.c</a>.</p>

</div>
</div>
<a class="anchor" id="adb7d6e26bb22986630d83d48399e8d1f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int proto_expect_command </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>socket_descriptor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>command</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="protocol_8c_source.html#l00082">82</a> of file <a class="el" href="protocol_8c_source.html">protocol.c</a>.</p>

</div>
</div>
<a class="anchor" id="ac851c29c26c03f25155d82adaada4014"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void proto_get_protocol_code </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>socket_descriptor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>proto_name</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="protocol_8c_source.html#l00027">27</a> of file <a class="el" href="protocol_8c_source.html">protocol.c</a>.</p>

</div>
</div>
<a class="anchor" id="ab317a4b5fae174c50e993b8498c682e5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void proto_goodbye_failure </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>socket_descriptor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>command</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="protocol_8c_source.html#l00139">139</a> of file <a class="el" href="protocol_8c_source.html">protocol.c</a>.</p>

</div>
</div>
<a class="anchor" id="a8c3cd7cda7ec9b4be4d8176a0223244b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void proto_init_library </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="protocol_8c_source.html#l00011">11</a> of file <a class="el" href="protocol_8c_source.html">protocol.c</a>.</p>

</div>
</div>
<a class="anchor" id="ab25c6487e37049b4495c8ce9737c2eba"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="protocol_8h.html#a53a45e5bfa8921af754097ee6a02f642">proto_module_t</a> proto_lookup </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>proto_name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="protocol_8c_source.html#l00060">60</a> of file <a class="el" href="protocol_8c_source.html">protocol.c</a>.</p>

</div>
</div>
<a class="anchor" id="a4991c680adc37a7841e8a1cc0c6bf993"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int proto_plain_get </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>socket_descriptor</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="protocol_8c_source.html#l00270">270</a> of file <a class="el" href="protocol_8c_source.html">protocol.c</a>.</p>

</div>
</div>
<a class="anchor" id="abf4ad03750e4dc1c4fb7ef3dfc603511"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int proto_plain_put </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>socket_descriptor</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="protocol_8c_source.html#l00150">150</a> of file <a class="el" href="protocol_8c_source.html">protocol.c</a>.</p>

</div>
</div>
<a class="anchor" id="a3f6e333d7821f4dc1a2105414a73e259"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int proto_send_command </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>socket_descriptor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>command</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="protocol_8c_source.html#l00124">124</a> of file <a class="el" href="protocol_8c_source.html">protocol.c</a>.</p>

</div>
</div>
<a class="anchor" id="ac363fe1082eefee61957cb913f6b90ca"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int timespec_subtract </td>
          <td>(</td>
          <td class="paramtype">struct timespec *&#160;</td>
          <td class="paramname"><em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct timespec *&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct timespec *&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="protocol_8c_source.html#l00611">611</a> of file <a class="el" href="protocol_8c_source.html">protocol.c</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_48915bc83c3e9a2c33920cc086982b8a.html">comm</a></li><li class="navelem"><a class="el" href="protocol_8c.html">protocol.c</a></li>
    <li class="footer">Generated on Sun Nov 16 2014 15:38:22 for Encrypted file transfer by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
